package qualifierBean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

/**
 * Created by ztt on 2017/9/21.
 */
@Component
public class FactoryService {

    private PersonService personService;

    @Autowired
    @Qualifier("workerService")
    public void setPersonService(PersonService personService){
        this.personService=personService;
    }

    public void getWorkerCount(){
        System.out.printf("工人总数：%d",1000);
    }
}
